home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_casm / jlvesa11.zip / JLVESA12.ASM < prev    next >
Assembly Source File  |  1995-11-14  |  751b  |  42 lines

  1. ; This routine is part of VESA SVGA -library
  2. ;
  3. ; Copyright 1994 Johannes Lehtinen
  4. ; All rights reserved
  5.  
  6. model large,c
  7. p386
  8.  
  9. segment jlvesa12_TEXT USE16 'CODE'
  10. assume cs:jlvesa12_TEXT
  11.  
  12. ; void JVSVGA_WaitForVRetrace(void)
  13. ;
  14. ; Odottaa kunnes vertical retrace alkaa
  15.  
  16. proc JVSVGA_WaitForVRetrace far
  17.    public JVSVGA_WaitForVRetrace
  18.  
  19.    mov   dx,3daH              ; VGA-port
  20.  
  21.    ; Wait if there is vretrace allready going on
  22.  
  23. wait_loop1:
  24.    in    al,dx
  25.    test  al,8                 ; Test if vretrace
  26.    jnz   short wait_loop1
  27.  
  28.    ; Wait until vretrace begins
  29.  
  30. wait_loop2:
  31.    in    al,dx
  32.    test  al,8                 ; Test if vretrace
  33.    jz    short wait_loop2
  34.  
  35.    retf
  36. endp JVSVGA_WaitForVRetrace
  37.  
  38. ends
  39.  
  40. end
  41.  
  42.